/**
 * Copyright 2010 Adam Ruggles.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package saig.engine.models.enemies;

import saig.engine.Context;
import saig.engine.models.Model;
import saig.engine.models.Sprite;
import saig.engine.models.enums.ModelType;
import saig.engine.models.interfaces.Damageable;
import saig.engine.resources.ImageLoader;

/**
 * Spiny enemy model.
 * @author Adam
 * @version $Id$
 * 
 * Created on Aug 11, 2010 at 10:54:45 PM 
 */
public class Spiny extends Model implements Damageable {
	/**
	 * Used to determine if the Spiny is dead.
	 */
	private boolean dead = false;

	/**
	 * @param context
	 */
	public Spiny(Context context) {
		super(context, ModelType.SPINY);
		Sprite[] sprites = ImageLoader.getInstance().getSprites("enemies.png", 16, 32);
		frames = new Sprite[2];
		frames[0] = sprites[2];
		frames[1] = sprites[3];
		frame = 0;
	}

	/**
	 * {@inheritDoc}
	 * @see saig.engine.models.Model#getHeight()
	 */
	@Override
	public int getHeight() {
		// TODO Auto-generated method stub
		return 16;
	}
	/**
	 * {@inheritDoc}
	 * @see saig.engine.models.Model#getWidth()
	 */
	@Override
	public int getWidth() {
		// TODO Auto-generated method stub
		return 16;
	}
	/**
	 * {@inheritDoc}
	 * @see saig.engine.models.Model#performUpdate()
	 */
	@Override
	public void performUpdate() {
		// TODO Auto-generated method stub

	}

	/**
	 * {@inheritDoc}
	 * @see saig.engine.models.interfaces.Damageable#isDead()
	 */
	@Override
	public boolean isDead() {
		return dead;
	}

	/**
	 * {@inheritDoc}
	 * @see saig.engine.models.interfaces.Damageable#takeDamage()
	 */
	@Override
	public void takeDamage() {
		dead = true;
	}

}
